<?php

namespace app\Modules\Api\models;

use app\models\Showpic as BaseModel;

/**
 * LoginForm is the model behind the login form.
 *
 * @property user|null $user This property is read-only.
 *
 */
class Showpic extends BaseModel
{
    public function fields()
    {
        $fields['url'] = function(){
            $pic = $this->pimg?$this->pimg:'default_photo.jpg';
            return \Yii::$app->params['uploadUrl'].$pic;
        };
        return $fields;
    }
}